<?php 
	session_start();
	if(!$_SESSION['userId']){
		header("Location:login.php");
		exit();
	}
	$userId = $_SESSION['userId'];
	$con = mysql_connect("localhost", "root", "root");
	if (!$con) {
	    die("couldn't connect " . mysql_error());
	}
	mysql_select_db("jianglaifarm", $con);
	$result = mysql_query("select * from land where user_id = $userId");
	echo "<table>";
	while($row = mysql_fetch_array($result)){
		echo "<tr>";
		echo "<td>";
		echo "1111";
		echo "</td>";
		echo "</tr>";
	}
	echo "</table>";

?>
